﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Content.Area.List" Title="区域信息管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
区域信息管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <table width="100%">
        <tr>
            <td valign="top" width="30%">
                <div class="action_bar">
                    <asp:Button ID="btn_country_add" runat="server" Text="增加" 
                        onclick="btn_country_add_Click" />
                    <asp:Button ID="btn_country_update" runat="server" Text="修改" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvCountry'));" 
                        onclick="btn_country_update_Click" />
                    <asp:Button ID="btn_type_delete" runat="server" Text="删除" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvCountry'));" 
                        onclick="btn_type_delete_Click" />
                </div>
                <fieldset>
                    <legend>国家</legend>
                    <asp:GridView ID="gvCountry" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="CountryKey" AllowPaging="True" PageSize="20" 
                        PagerSettings-Mode="Numeric" onrowcommand="gvCountry_RowCommand" >
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0" type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CountryName" HeaderText="名称">
                            </asp:BoundField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="lbtn_SubList" CommandName="CheckSubList"  CommandArgument='<%# DataBinder.Eval(Container, "DataItem.CountryKey") %>'>&gt;&gt;</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerTemplate>
                            <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="First"></asp:LinkButton>
                            <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                            <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                            <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                            <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        </PagerTemplate>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有可用的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
            <td valign="top" width="30%">
                <div class="action_bar">
                    <asp:Button ID="btn_ProvinceAdd" runat="server" Text="增加" 
                        onclick="btn_ProvinceAdd_Click" />
                    <asp:Button ID="btn_ProvinceUpdate" runat="server" Text="修改" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvProvince'));" 
                        onclick="btn_ProvinceUpdate_Click" />
                    <asp:Button ID="btn_ProvinceDel" runat="server" Text="删除" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvProvince'));" 
                        onclick="btn_ProvinceDel_Click" />
                </div>
                <fieldset>
                    <legend>省/直辖市</legend>
                    <asp:GridView ID="gvProvince" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="ProvinceKey" AllowPaging="True" PageSize="20" 
                        PagerSettings-Mode="Numeric" onrowcommand="gvProvince_RowCommand" >
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0" type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ProvinceName" HeaderText="名称">
                            </asp:BoundField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="lbtn_SubList" CommandName="CheckSubList"  CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ProvinceKey") %>'>&gt;&gt;</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerTemplate>
                            <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="First"></asp:LinkButton>
                            <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                            <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                            <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                            <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        </PagerTemplate>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有可用的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
            <td valign="top" width="40%">
                <div class="action_bar">
                    <asp:Button ID="btn_CityAdd" runat="server" Text="增加" 
                        onclick="btn_CityAdd_Click" />
                    <asp:Button ID="btn_CityUpdate" runat="server" Text="修改" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvCity'));" 
                        onclick="btn_CityUpdate_Click" />
                    <asp:Button ID="btn_CityDel" runat="server" Text="删除" 
                        OnClientClick="return acu.gv.checkModify(fixId('gvCity'));" 
                        onclick="btn_CityDel_Click" />
                </div>
                <fieldset>
                    <legend>城市/地区</legend>
                    <asp:GridView ID="gvCity" runat="server" AutoGenerateColumns="false" CssClass="GridView"
                        DataKeyNames="CityKey" AllowPaging="True" PageSize="20" 
                        PagerSettings-Mode="Numeric" >
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0" type="checkbox" title="点击全选或反全选当前页所有信息" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CityName" HeaderText="名称">
                            </asp:BoundField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="lbtn_SubList" CommandName="CheckSubList"  CommandArgument='<%# DataBinder.Eval(Container, "DataItem.CityKey") %>'>&gt;&gt;</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerTemplate>
                            <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="First"></asp:LinkButton>
                            <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                            <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                            <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                            <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        </PagerTemplate>
                        <HeaderStyle CssClass="GridViewHeader" />
                        <RowStyle CssClass="GridViewRow" />
                        <FooterStyle CssClass="GirdViewFooter" />
                        <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
                        <PagerStyle CssClass="GridViewPager" />
                        <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
                        <EmptyDataTemplate>
                            没有可用的数据</EmptyDataTemplate>
                    </asp:GridView>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>
